fixed lagend problem