Fixed some bugs that occured due to me failing at merging >_<