fix joinTable being undefined