fixes for recursive compilation