Made it compatible with the latests changes to the SDK