Bugfixes!

Fixed #264
Fixed #232
Fixed #228

That's 3 less bugs on the googlecode list. \o/