Do you have RX pin of UART connected to pullup? If not than you can have an issue of registry erasing.