fix bug
begin activities table
...
watch out: introduced bugs