Fix bug with numeric task names and --tasks. fix #2593