Correctly mark tasks completed if multiple are specified