correct shifting step based on based on bad character shifting rule