Add a comma (or a comma + and) before "then"