Bug found and partially fixed.