funny behavior after altering code