Fixed nullpointerexeption