Various bugfixes

Fixes for: 
#3482
#2469
#3928
#3863
#3769
Oh, I think you might be right.