Some serious debugging. Bug found, not fixed.