Bugfixes

Many Bugs were fixed