Fixing batch size floating point error