fixing rare bug (1/256 chances)