Made some additional changes for better tracing