fixed #522