Fixed an uncaught exception