When in DOING-tab, changing task-state first, changing rank thereafter throws exception. #4
removed debug variable