Build as Lib Fixes