added single close call to orm to avaoid db locked messages