gil's fixes