Fixed db_sql etc being confused on empty vs not set metadata
Fix os_session to work with sql properly