Fix a few missing explicit casts

Also fix wrong function return type for Sys_GetCurrentUser