Fixed compile warnings

Fixed warnings with gcc4.8.