Fix error that was triggering the emails