Fixed freeze on Ubuntu