remove middleware left over