minor bug fixed on ORM class