Some fixes to glue cs.endpoint and tasks.endpoint togehter.