Bug fix: use parsed input value instead of entire input string