Fixed event binding problem