replaced old error invocation
execute command multiple times if selector queries multiple elements