fixed #367
fixed #321