Fixed bug with tasks being labelled incorrectly