remove captions before switching branches