Semantics bug fix