                      project_id  = {@props.project_id}
                      file_path   = {@props.file_path}
                      font_size   = {@props.font_size}
-                     is_prev_sender   = {is_prev_message_sender(i, k, @props.messages)}
-                     is_next_sender   = {is_next_message_sender(i, k, @props.messages)}
-                     show_avatar      = {not is_next_message_sender(i, k, @props.messages)}
+                     is_prev_sender   = {is_prev_message_sender(i, sorted_dates, @props.messages)}
+                     is_next_sender   = {is_next_message_sender(i, sorted_dates, @props.messages)}
+                     show_avatar      = {not is_next_message_sender(i, sorted_dates, @props.messages)}
                      sender_name      = {sender_name}
                     />
         return v

            e.preventDefault()
            mesg = @refs.input.getValue()
            # block sending empty messages
            if mesg.length? and mesg.length >= 1
                @props.redux.getActions(@props.name).send_chat(mesg)
                @clear_input()


        </Col>

    blank_column:  ->
        <Col key={2} xs={2}></Col>

    render: ->
        cols = [@avatar_column(), @content_column(), @blank_column()]
