fixes for rotation bug used for flatline pattern