fixed #340