Fixed a bug with getting notifications when there are no layers.