Fix to make main_activities block Tempcode-safe