Fix javascript inclusion in the base template