Fixed "Multiple tasks get added to primary" bug

Ensured that only one task is of that primary colour at any given point
of time.