Fixed a nasty bug.