null pointer stuff fixin