Fix test compile issue
Fix some build issues