Fixed casts and Builder::toShort and Builder::toByte.