Updated more logic flow.