Fix target handling.