One more fix up on the snap and glue functions.