fixed glitch on some java versions