Cave detector bugfix