Class bug fixed