fixed join issue #29; added condition statement to check type