a few fixes to enable running in strict mode
Merge pull request #1 from csantero/strict-mode-fixes

a few fixes to enable running in strict mode