Fix javascript errors on page load
Fix related widget service and template