Phone Nexus 5 Focus doesn't work

Hey all, I looked around the forum but can't find any topic about this problem:

I just can't focus anything, and I can try for 5, 10 minutes and it doesn't work, but sometimes (rare, but happens) the problem goes away and the camera just works fine!

Anyone have this problem? Any fix?