bugfixes: order of calls etc.