fix bug when choose a resource if the user has no resources.