Market rebounds in closing minutes