Fixed error on focus loss.