Fixed a quarry bug

Updated find_next_digpos to add some accidentally lost changes our fork needs.