fix fatal errors