Fixed some bugs
Bugfixes