appdelegate logic test fix