fixed warnings in chat classes and inserted some additional argument
checks