Fixed nullpointerexception
Did some stuff