Fix problem with cast comparison in exact-lenght