Fixed more bugs that I forgot to fix in the last commit