Some fixes

Fixed #20, #23