Fixing some issues, closing #1