Stir in the garlic, ginger, turmeric and spices. Keep stirring over medium until the spices are toasted a bit. A lot of recipes call this the key step. This mixture should be gently toasted for quite awhile, until the onions are nearly caramelized really. You'll find that this long and gentle toasting of onion, spices, etc. is a common theme in Indian cooking. Take special care here and I'm sure that after a few goes, you'll find a technique you like. But, don't let that keep you from improving.