RIl workarounds from maniac103