update database + session fix