Add log and change js to avoid not call to the action