Navigation track lost

Hi…no too much rolll, simply went stright out of plan track and as I sad I used HDG to regain the track and after at NAV press resumed navigation as planned.
This occour three or four times randomly…somtimes the flights are correctly executed.
Ok…not a big issue at the moment…fortunatelly my first officier is very careful.