Added code to destroy loading bar upon image change