fix some commands and nested functions to also be case insensitive