Fixed some bugs i think.