Drop privileges correctly