Fixed duplicate row bug