Kicad 5.1.4 solder mask issue

You can read this FAQ article: How does solder mask layer work?. You can also give a link to your project (not just gerbers) here, it may be easy to find the problem by inspecting it.