fixed some null pointers. Sorry Lily.