Fix uncaught error