Fix capcode parsing. #968