Fixed a few errors

Not sure if it's working, though ;)