Fix fatal errors