Ajax bug not calling update view