fixes for script layout for affix routine