BUG: Real bug fix from previous issue (removing rows from table was not done properly)