Fixing 5456 master

fixes #5456 

@danimo please test - THX
@bantu @karlitschek - please review - THX