fixed bug in STW