fix type of num