fix #512