removing slash at the end