uninitialized variable $find_real_end error corrected