Fix compile errors

As per a couple threads on forum, decided to push my quick fix
Merge pull request #1 from KurtE/master

Thanks :)