fixed a parse error with PHP 5.3

error and small typos found by @adrian, thanks!