Fixed issue with join