added more specs. fixed error handling for unknown object types