Fixes #1174
finish merge