port bugfix into backword branch