Fix onerror test