Had to modify lines 81 and 757 in functions.php (change the URLs to https) to make it work on https enabled website.