Bug fix for square dividing level, and for character code