Fixed huge bug where ajax ran twice issue #8