added fix to parameter sanity check
yet another fix for metadata size detection