fixed some typos and backwards compatibility