Fixed issues #24, #20
Fixed issues #24, #20