Cast some Bernard parameters to integer to avoid type bug