added logging
fixed possible problems with ST3