Improvements to make it compile on Raring