fix bug causing include files to be copied incorrectly