fix #540