fix remove not working properly