fixed problem with on class