Improved WKB analysis of slow-roll inflation