Working on some bugs correction