Fix borked random gradients and duration in bash