Fixed some bugs caused by my STUPID mistakes!