fixed #57, fixed #55, fixed 154