devhax fixing logic flow.