Fixed select from non existing table bug