Fixed NPE when instrument error occurs.