Fix logic of center code check