fixed undefined variable error on travis