Fixed bug with addClass if className was null before