Random and other small fixes