changed some small details for clang compatibility