minor bug fix after checking with clang compiler