attempt to fix #667