MANTA-17 Fixing off-by-one error