fix to ensure javascript is always included correctly