It seems  was causing some erroneous behaviour