Strange issue with reply function