fix a coercion bug and checkin a regression test for it.