Fix some bugs (OOM, no original image on begin for pot, not clear settings when replay) and enhance the UI