correcting manhattan bug