moved invocation of the PrepareDeviceSettings event to the initialize method.