Bugfixes
Some small bug fixes