Fixed compile warnings

Fixed warnings with gcc4.8.
fixed to only remove n_prepare.