Fixed bug concerning classes on preview