Fixes fatal errors