Fixes to train and varinfo tasks