many fixes done in #bdw13 @plista