- added addition clearinputstream because of synchronization message index error