An attempt to fix #1402