cont. fix potential nullptrexception