fix ajax issues