Small changes

A bit safer this way
Fixes

Whoops, that was a bit too save ;)
Merge pull request #1 from bramschulting/fixes

Small changes