Added a bit of error checking
Fixed Conflict