Alot of bugfixes