Fix bug displaying error