Fixed a few bugs and reduced risk of user error
Fixed a few bugs