It may be pH related. The beneficial bacteria thrive best on a pH above 8. When the pH drops too fast, the bacteria can suffer and you see an ammonia spike.