fix CPU threading, fix tape bugs