Could you tell me if both following sentences are perfectly natural and correct?
If he was doing his homework, he would have more time to hang out with his friends.
If he were doing his homework, he would have more time to hang out with his friends.
I'm aware that when the main verb in the if-clause is be then both was and were grammatically correct. Were is even more so, though. But, what about if it's part of the past pregressive in a condional sentence as in the example above?