derive correct application root