Ported to new task states