Better callback handling in search_mode_1