Issue number 24 & 5

Fixed the bugs of the upper mentioned issues
Merge pull request #61 from Serame/master

Issue #5 and Issue #24