Fix: Update related variables when using search