The D50 contacts seem to be prone to malfunction,especially with older models not looked after,dust and grime are usually the main culprits,the D50 I bought was the same,but nothing a good clean up won't solve,the Numeric buttons and patch select buttons are a little more awkward to remedy,mainly because over the years of being pressed the pads on which they rest to trigger the circuits wear down,so after many years they need pressing down harder and further,eventually not working at all,they can be repaired but you'll need to do a little bit of soldering work or buy a total replacement circuit board for the given buttons.
Not sure what spares availibility,is for the D50 but if its anything like the JD800 fiasco I've had of late trying to remedy my Keybed(Roland decided to change the Keybeds part way through production)and of course my model had the earlier keybed,meaning the spares are not availible,so have to replace the whole keybed and circuitry,Fuji card and keycontacts,which has been a bloody nightmare,I'm still waiting for a part at the moment this was 6 weeks ago.I can still use it via Midi,but at the moment its sat in a corner looking all sorry for itself with no keyboard assembly.
I think just about every D50 Owner I've known seems to have had the same issues after buying an older model,well they are 20 years old now...Nothing a good clean won't resolve