bug fix, freezing