Potential bug fix when reading in classes