fix bug with changing css class