removed bug that occur when you connect from java