Fixed a bug in the earlier fixes.