Move loadImages method to viewDidLoad instead of viewDidAppear.