Fixed some static lib problems