Fix issues when compiling to multiple files