Changed from ltrim to str_replace to remove multiple backslashes