Added multi app support