Fixed multiple table join issue, full credit goes to @Andy-V. Fix #9.