Fixes for ubuntu 12.04