crt-off fix credit:codeworkx