Bug fix

The previous patch also had a bug.