close request properly