Part 2: Fixed error noticed by David Case - made framecde consistent with change