Various Bugfixes

Fixes #2534
Fixes #2431
Fixes #2493
Fixes #2500