bug fixes and spelling error fix :D