fixed #507