Fixed fatal errors for D8.