Fix log head/tail functions.