fix #507