fixed closing pr function