bug fixed in PadExists(i j k) method. bad check range