make this code work with yesod 1.2!