fix small bug spotted by David W