Fix 'main' for new function signature