Fixed bug for no layers loaded

Fixed bug when selected features options is enabled for no layers loaded