Tried to correct angularjs bug.