fix various minor bugs in TOV solver