fix white flash during transition