Fix removeFields bug