There are case where the `action` dict is not there and case where it is

This also fixes the tests suite