Fix for #2541
Fixed wrong type. Caused overflows and broke GC.