Fixed some "type mismatch" compiler warnings