Fixes to actually make things work on debian