fix watch function for controller