Don't yell at him unless you actually catch you him in the act, they can't associate you yelling at them to something they did 2 minutes ago.

Also don't yell at him until you get his urine rechecked, it may not be his fault, he may still have an infection. Have you had it re-checked yet?

Also is he urinating in the same spots everytime or allover?

How old is he?
How long have you had him?
Is he neutered?


Monitoring him should help, like mentioned before take him out in the middle of the night, etc. As often as possible, especially if he still has an infection.

Does he give you any clues at all when he has to go or is it only when no one is home?