Fixing a bug which caused viewDidLoad to be called unexpectedly early.