Fix for a crash issue.

Signed-off-by: Kitiara <vinas_solamnus1@hotmail.com>