removed unexpected then