fixed a bug in front_frag