Lot of bugfix