Fixed all warnings from -Wshorten-64-to-32