fixed #512