Patched to work on debian