fix orm factory