Fixed casting errors regarding :1312 number error