guard against NaNs in ship movement