fixes for 'headerOnly' mode