add error flash if search doesn't go through, fix views