fix uncaught error