#16 - fix the last complicated bug.