Fixed a backdoor error in the setting of maxspeed

In the previous version setting the maxspeed after construction did not
check if the current speed would be higher then the new maximum speed.

This is a bug, since the currentspeed should never be able to be larger
then the maximum speed.
This new part of code solves that problem