add workaround for https://github.com/tessel/beta/issues/336
optimize workaround for https://github.com/tessel/beta/issues/335 a bit