On the rapid variability of AM Herculis