Bug fix: incorrect use of exists