Issues with n64 joystick?

so i finally have everything working like i want, but one problem. i have a mayflash n64 adapter. now this works fine with other emulators. and my official n64 works fine on my n64 and other emulators. but my joystick has issues. when im at the main menu, ill hit right and every few flicks it decides its going to go left. im using under, retroarch.cfg and its under "input_joypad “udev”. how do i fix this this? any help or advise would be greatly appreciated.