bug fix infinate loop ahhh