added check for empty subscription array crashing app