Updated to work on Ubuntu