a bit better fix for issue #1049

at least i like it more