Fixing DeviceManagementRepository initialization related issues