Sure -- if the genitive singular ends in -и, then the noun is feminine, but if the genitive singular ends in -я, then the noun is masculine!
Which is, of course, just another way of saying that when you learn a new Russian noun, it's a good practice to memorize the nominative singular AND the genitive singular at the same time. (For the majority of nouns, knowing these two forms will allow you to correctly determine the gender and to logically deduce all the other forms. Of course, there are exceptions -- some nouns have irregular patterns in the plural, so memorizing only the singular forms won't help you there.)
In the same way, when you learn a new Russian verb, memorizing the infinitive isn't enough. At minimum, you should learn the infinitive, the 1st-person sg., and the 2nd-person sg., -- most of the time, you'll be able to work out all the other forms given these three.