Fixes to compile on library project