wee bit of error handling

Not sure why I did it. Just felt like it.