Fixed some issues.

Fix for: #22
Fix for: #23
Fix for: #20