fixed a crash when trying to type in chat screen before any messages are there