fixed issues with chat servlet.