Some bug fixes. Version 1.1