fix object factory