Fix some compile issues