Updated to support java 1.7