fix for a very rare bug