fix #453 and fix #532