Fixed #50, fixed #79