Bug fix.

Major bug fix