Thread:Extension talk:SmoothGallery/errors on mw 1.16.4

i got a couple of errors when i tried installing on my wiki, first using i got that there was an invalid argmuent supplied for foreach on line 23 of smoothgalleryclass, when using #sgallery i got Fatal error: Call to undefined method Title::expand in /home/aiowiki/aiowiki/w/includes/parser/Parser.php on line 926