fixed testing for remove