fixing returns for insert and update