fixed max vel logic and some debugging