Correct exists function.