Fixed include dirs and added hardware sync call.