fix buttons flickering