fix problems with null
done lots of shit