Fixed some NPEs with Teams. Fixed #4. Fixed #3