Fixes to allow for independent compilation