For a good joint, a fluted or spiraled dowel must fit snugly enough in the hole to allow the glue to come up around it. The dowel should reach to the bottom of the hole and be used with enough glue. For insurance, apply glue to both the sides of the hole and to the dowel itself.
Bent nails often result from poor hammering technique. However, they can also be caused by a dirty hammer face, especially when using cement-coated nails or working around adhesives. If you have problems, occasionally run a piece of fine sandpaper or emery cloth over the face. If you keep the face clean you will gain more solid contact with the nail and will avoid black marks on the wood caused by a dirty hammer.