fixing an application order issue