Fixed incorrect handling of non-existing app UIDs.