further fix syntax errors in shifting functions