Fixed the algorithm parser so that it's compatible with Java 1.6