Fixed memory leak due to event not being unbound.