Fixed warnings on both clang and gcc. This shoulw really fix #3