Fix subscript lvalue problem