Bound states in photonic crystal waveguides and waveguide bends