fixed bug with refactor for $app in getRestConfig()