fixing a few second-order problems