Why Thank you message works differently depending on what code i use?