Fixed extract and merge commands