Change constructor method to workaround java7 complainace issue.