Attempt to fix #1004