Fixed bug with opening DAO objects