Fixed uncaught error