fix bug in findhazards