Fixed auto-name bug