changed to end persistent db connections