Add protected to some functions