Fixing bugs, phase 1.