fix uncaught angular error