Improved modification of BasicSpan.java