use remote_type_name instead of remote_type. SQLite seems to return the wrong integer for the remote_type