fix broken factory