Changed the function to protected as before.