Fixed a NASTY bug