fixed get_front_d and get_rear_d incorrect implementation