fixed some issues with using libs as standalones