dplyr join factor level bug fixed but leaving the extra factor level setting code as a precaution for a while