fix some business logic