Updated core to include better error handling.