fixing bugs in turn system