Changed the exception logic around to be cleaner