Fix append_slash failed bug