Fixed #5872: Remove useless code