fix ajax registration