Added in some handling of nil views