Fixing assumptions about max supported long [ci skip]