jQuery fix for white flash