Fix classes behavior