Fix variables and conditions.