Fixed autoreplier. Now it knows when it writes a message.