Fixing the code to work under SDK 0.9.4

Signed-off-by: Mikhail Grigorev <sleuthhound@gmail.com>