fixes exception (array index out of bounds - due to off by one error) when applying...