fixed the setting of viewed property on posts