fix to handle optional res.js and res.css