fix error in morris js firing on all pages