improve how long case is handled in scalajsenv