fix bug (make sure we are removing the correct records