The effects of a magnetic barrier and a nonmagnetic spacer in tunnel structures