x class duplication error fixed