fixed quite many bugs ...