Fixed layers counting. Now result list contains 1st layer (in old version it was being deleted)