Fix parsing in JRuby