fixed #165
fixed review comments