Fixed nullPointer Exception