Attempt to fix #1576 & #1627