Corrected walkability function.