Fixed a bug in extract_ridges. Once used F instead of C=FtF