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

Sorry Georgi..