fixed some bugs
and more logs
fixed bugs