Fix logic and refactor create reply