remove incompatible code. fix ajax call