fix many bugs from previous commit
result of previous commit