fix nullpointers