fixed fail on orientation change