Bugfix
Lots of changes