Revert "fixed null exceptions"

This reverts commit 6591d5eb642606809c52eb7da8a8b34b3f1fc512.