Fixes thanks to Alan Pope.