add waitforidgone
add sleep to avoid the error