fixed logical error in is_coord check