Fixing issue with javascript trying to load data at the wrong times.