Use -s to display what the variables are set to at the time they are set and see if that helps you find the problem.