fix for getting random long values