fix error - comparing element