Updated to defer the javascript execution and hopefully fix the category
list