Fix parent in error listener