fixes #5470 final version