Fixed incorrect patch positions in getPatchSizes