Major bug fix.