Moved sbox check a bit down