Some improvements and commands bugfix