Bug fix from Rich