Fixing SDK code