Fix a bug in a recent patch that broke shifts