fixed #411 fixed #408