fixed nullpointerexception (derp)