minor changes to make it compile on ubuntu