Some fixes.

Please look over them, I don't want to start breaking things so early :)