fixed chat functionality back and front
trying to merge