Fix target verification (issue #1823)