Fix bug on remove element