fix #585