fixed #354,fixed #352

fixed #352
fixed #354