Wrap_content view inside a ConstraintLayout stretches outside the screen

I am trying to implement a simple chat bubble using a ConstraintLayout. This is what I am trying to achieve: However, wrap_content does not do what I want. It respects the margins, but expands out...