fixed linking errors and release errors