fixed #250
fixed #249
fixed #236