Fix some Vlaue/int conversion