fixing fatal errors and redundant checks