Better way to fix #1187