Clang compatibility patch

this patch fixes some issues with some clang versions