fix lookup code for the watch file