Little improvements on event binding