improvement to unlock warning