Fixed crash.

Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>