fix issue with empty stylesheets or javascript source