fix a bug in display_result method