fixed function resolution issue pointed out by markjreed