fixing a bug with the footer script and setting defaults