Fixed typo in EXISTS sql