improve appframe overlay, fixes #8, #4