fix: wrong condition inplace