Fix: Convert a value typed as int to one typed as int64.
Fix: Remove a duplicated code.