Revert "Fix main function again"

This reverts commit 76bbd7782a34d9e189c13e5d7eddc77e2345c2c1.