cleanup frame only after apply is finished