fixed includes, and compilation error
fixed some ambiguities
fixed compilation error