Bug fixes

Fixed #2, #5
Signed-off-by: Avantol13 <avantol13@gmail.com>