Fixed warning when compiling with -Wshorten-64-to-32 flag