Fixed usage of exceptions and a couple of tiny copy & paste bugs