added several lines to make it compatible with the leanPress theme