fix problems with null