Updated the logic in jade.