Bug fix for the case when the size of the input is less than the chain size