bugfix for whole process