Fix for duplicated event triggered when using ajax.

@tonydspaniard  Done