Fix for using lookup field in advance search