toString() added before replace to ensure its type