fixed lib_path and some macros