Handle app re-creation.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>