plugin correct setLayer if exist