change behavior of prepare_panel