Fixes complete task issue in client-side code