Fixed a few weird errors