fixed DatabaseObjectNotClosedException