Updated code for SDK version 3.3.5.