Close and return to previous window