set last viewed feed type and id and added casts to int for parameters