Reverted last changes and added ignore_orphans flag to build script