XRange and Lib Fixes