Code cleanup to use get_config correctly instead of casting the return value