error and object bugfixes