Corrected metacat and metatag

fixed compilation/logic errors, seems to be finished for now