Bugfix

Fixed some code