Dalex,
maybe your problem was in focus, if you used macro AF, then you should help your camera, because automatically it likes to focus on a background, you can draw black spot on a glass, so camera can easy focus on that spot, or just use manual focus. Another thing is you shouldn't use flash but you can set higher iso, to reduce exposure time, if you don't have tripod