Fixed uncaught exception