fixes #1041

but it looks weird