Changing type of fragment() from public to protected.