Some fixes for variant