Fixing issue with wrapping around incorrect bound.