fixed freezing error

fixed freezing error