Adjust Status in insert and update