fixed a null pointer exception

my bad :P