fixed bugs caused by updated class implementation