fixed bug nullpointerexception