completed adding the workarounds from the original driver script