fix #504