Yeah, I'm not sure you did anything wrong, it could have just been bad luck, but just to be on the safe side, Google IM injection sites. Just flexing and aiming for the muscle isn't good enough. Quads are a good example, they're big and easy to reach, you can flex them and see where they are, but there's good spots and bad spots to pin. Some areas have more nerves and blood vessels than others, that's why it's important to look at diagram to see what's what.