Solves error w/ clickOutside directive.