John 1:1 and Mt. 5:9

eirhnh umin:

En arch      hn  o   logos, 
In beginning was the Logos,

kai o   logos hn  pros ton theon,
and the Logos was with --- God,

kai theos hn  o   logos.
and God   was the Logos.
(John 1:1)

makarioi oi  eirhnopoioi, oti autoi uioi theou  klhthhsontai.
Blesses  the peacemakers, for they  sons of God shall be called.
(Matthew 5:9)

How is it possible to translate theos as "a god"
and theou in Matthew 5:9 as "of God" ?

If the decision is to render John 1:1c "a god",
mustn't the rule be carried out consistently

If theou is the genitive case of the same noun 
(second declension) -- without an article, mustn't 
it be rendered "of a god" to be consistent
with the rendering of John 1:1c ??

I am just a beginner here, if I made a mistake
in translation or in transliteration, 
please let me know.

Jim Beale