wfd + some compilation fixes