Lower displacement Yamahas are kinda known for having this issue, sometimes if you leave them in the sun for a long time on a hot day the fuel pump starts acting up, opinions vary on the solution online, but when this happened to mine last year I replaced the pump and it worked fine. You should be able to find a replacement pump on ebay relatively cheaply, and they're pretty simple to change yourself.