Fixes two bugs (64bit assumption and template repeat call)

Present when compiled with 2.065. Fixes these issues.