Fix a bug in the previous patch