Multiple Fixes

Fixed some NPEs