fix in thread and image state