Fixing a lot of errors