The symbol `base` is undefined here.  Have you tested this?