fix bug where missing source dirs caused exceptions