fixed typos and backward compatibility