possible fix for problems mentioned in 3ba0ba57f8a0cb4ab30e8f5f1a4734dc78fa6bfb