Fix some fatal errors