Fix minor errors with main