Fixed bug with Post search and added test