fixed major declaration storing bug