severals bugs corrections