Found issues in redirect link for post and a missing instance variable