fix undefined $main_user