ugly ajax fix