fixed operation order by code