close dbsession before render