Fixed npe

Signed-off-by: Grafe <flingelfrank@hotmail.com>