Fix unbinding undefined bug