Fixed issue with string replace key error