Possible freezing bug fix