Fixed object creation problem