Fix problems with path and schema name detection