Hotfix multiple errors (hotfix #366)