Fixed error, added global chat hook