Fixed small bug with out of range parameters