Move age variable to more appropriate location, fix #283