fix detect near_frame numbre