Fixes fatal error caused by not finding any subscribers

The subscriptions hook was assuming that there will always be subscribers. Now it checks whether there are any before it attempts to proceed.