Made changes for diagnostics