fix memleak Deferred: dismis fail listener when already resolved