test improvements, fixes #3156