fixed now bug and command handling bugs