Fixes

Changed code + Bugfixes