bugfix for ajax