Fix https://github.com/angular-ui/bootstrap/issues/493