Doctor Improvements

Fix #1580 
Fix #1566