Fixed issues

Fixed #24
Fixed #25
Fixed #30