Fix footer script bug