fixed empty scan problem