bugfix about ctx