You've likely cooked them on too high of a heat. Use low heat, so the outside doesn't burn before the inside cooks through. If you’re making the free-hand version, adding a few drops of water to the pan before adding a lid can help.