Add protected
Fix compile issues