The ref didn't blow until Salah went down as he let play continue incase there was advantage to Salah and he was still able to get a shot off, when it became apparent there was no advantage he then blew. You can't defend like that and expect to get away with it.