Fixed a bug about f_pos
Added some debug message, trying to locate the bug.