Null pointer errors with default view fixed