fix module callback called twice