fix behavior of remove