partially fixed the smpt error