close store after connecting