fix #1337

@lennartcl