Adapted things from the Wheezy 6.0 Update.