Added a bit of input checking