fix undefined variable $separator on build function

Fix the undefined variable separator on:
ErrorException (E_UNKNOWN)
Undefined variable: separator