fixed #248
fixed #897