fixed errors in locating elements