Some minor adjustements
Some bugs have been fixed