Fixed bugs with image state syncing.