Cleaning up the code to work on Debian 7 broke Ubuntu 12