Bug fixes, spelling correction