how to prevent loss of hair