fix a bug pointed out by Pino's test