Correcting parse if with nested blocks