Fix removeAt bug