create_from_local with replace bugfix