fixed createDevice