some fixes for right shift work