small improvements to static handling