Re-adding type cast, as suggested by @elemoine