Fixes

Fixed some bugs