Fix UpdateKeys not returning after invoke.

Thank you @itsbth