Fix bug main