fixes #5086 including junit test