Bug correction in classes