Fixes switch lag. Thanks to @rarst. Prefix function name.